package com.demo.gulimall.auth.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.io.Serializable;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * 会员
 *
 * @author Chen Yuan
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("ums_member")
public class Member implements Serializable {
	/** id */
	@TableId(type = IdType.ID_WORKER) // 老版本
    //@TableId(type = IdType.ASSIGN_ID) // 新版本
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`id`")
	private Long id;

	/** 会员等级id */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableField(value = "`level_id`")
	private Long levelId;

	/** 用户名 */
	@TableField(value = "`username`")
	private String username;

	/** 密码 */
	@TableField(value = "`password`")
	private String password;

	/** 昵称 */
	@TableField(value = "`nickname`")
	private String nickname;

	/** 手机号码 */
	@TableField(value = "`mobile`")
	private String mobile;

	/** 邮箱 */
	@TableField(value = "`email`")
	private String email;

	/** 头像 */
	@TableField(value = "`header`")
	private String header;

	/** 性别 */
	@TableField(value = "`gender`")
	private Byte gender;

	/** 生日 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`birth`")
	private Date birth;

	/** 所在城市 */
	@TableField(value = "`city`")
	private String city;

	/** 职业 */
	@TableField(value = "`job`")
	private String job;

	/** 个性签名 */
	@TableField(value = "`sign`")
	private String sign;

	/** 用户来源 */
	@TableField(value = "`source_type`")
	private Byte sourceType;

	/** 积分 */
	@TableField(value = "`integration`")
	private Integer integration;

	/** 成长值 */
	@TableField(value = "`growth`")
	private Integer growth;

	/** 启用状态 */
	@TableField(value = "`status`")
	private Byte status;

	/** 注册时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
	@TableField(value = "`create_time`")
	private Date createTime;

	/** 社交用户的唯一id */
	@TableField(value = "`social_uid`")
	private String socialUid;

	/** 访问令牌 */
	@TableField(value = "`access_token`")
	private String accessToken;

	/** 访问令牌的时间 */
	@TableField(value = "`expires_in`")
	private String expiresIn;

}
